//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - EntityName
// 1 - Properties
//===================================================================================

namespace App.Domain.Handlers {
    using App.Data;
    using App.Domain.Contracts;
    using App.Domain.Models;

    public class UpdatePicture {
        private readonly IPictureRepository _pictureRepository;

        public UpdatePicture(IPictureRepository pictureRepository) {
            _pictureRepository = pictureRepository;
        }

        public void Execute(ICreatePictureCommand pictureForm) {
            var picture = pictureForm.ConvertToEntity();

            _pictureRepository.Update(picture);
        }
    }
}
